package com.shanghai.shanghaielectric;

import android.os.Environment;

import com.shanghai.shanghaielectric.Model.DeviceState;
import com.shanghai.shanghaielectric.Model.db.ErrorInfoModel;
import com.shanghai.shanghaielectric.Model.WarningInfoModel;
import com.shanghai.shanghaielectric.Model.WriteDataModel;

/**
 * Created by Administrator on 2017/8/15 0015.
 */

public class Constants {
    public static String REPORT_PATH= Environment.getExternalStorageDirectory().getPath();
    public static boolean isScanState = true;//通信轮询界面，不下发参数
    public static int CURRENT_PRESSED_UNIT = 0;
    public static boolean isSettingParameter = false;
    public static int startButtonState = 0;//0: 不显示，1：启动，2：停机
    public static WriteDataModel writeDataModel = new WriteDataModel();
    public static DeviceState[] deviceStates = new DeviceState[8];
    public static boolean[] deviceFJStates = new boolean[8];
    public static int deviceCapacity[] = new int[8];
    public static int totalCapacity = 0;
    public static final long OUTLOGINTIME = 10 * 60 * 1000;//密码有效时间10min
    public static String USB_PATH = "/storage/usbhost1";
    public static String ANR_SERVICE_PID = "AnrServicePid";
    public static int SLEEP_TIME_200 = 350;         //目前210ms效果比较好  ，150~ 250效果不好
    public static int SLEEP_TIME_50 = 350;
    public static final String ADMINI_PASSWORDS = "270668";
    public static String USER_PASSWORDS = "000000";
    public static int errorCode1 = 0;
    public static int errorCode2 = 0;
    public static int errorCode3 = 0;
    public static int errorCode4 = 0;
    public static int errorCode5 = 0;
    public static int warningCode1 = 0;
    public static int warningCode2 = 0;
    public static int warningCode3 = 0;
    public static int warningCode4 = 0;
    public static ErrorInfoModel errorinfo_last_1 = new ErrorInfoModel();
    public static ErrorInfoModel errorinfo_last_2 = new ErrorInfoModel();
    public static ErrorInfoModel errorinfo_last_3 = new ErrorInfoModel();
    public static ErrorInfoModel errorinfo_last_4 = new ErrorInfoModel();
    public static ErrorInfoModel errorinfo_last_5 = new ErrorInfoModel();

    public static WarningInfoModel warningInfo_last_l = new WarningInfoModel();
    public static WarningInfoModel warningInfo_last_2 = new WarningInfoModel();
    public static WarningInfoModel warningInfo_last_3 = new WarningInfoModel();
    public static WarningInfoModel warningInfo_last_4 = new WarningInfoModel();

    public static String DevNum = "ttyS0";//"/dev/ttyS0"
    public static int DefaultSpeed = 9600;
    public static int Speed_19200 = 19200;
    public static int DataBits = 8;
    public static int StopBits = 1;
    public static int Parity = 0;

}
